package tgc.rj.zz.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import org.springframework.data.annotation.CreatedBy;

@Entity
public class Record {

	private Integer id;
	private String borrowedName; //借书人
	private String contactWay; //联系方式
	private String contactPhone; //联系电话
	private String date;  //借书还书日期
	private String accredit; //等待管理员授权，已借，已还
	private Integer reader; //读者id
	private String book;//图书名称
	private Books bk;
	private Integer day;//借书允许借多少天
	private String endDate;//借书结束的日期
	
	public Integer getDay() {
		return day;
	}

	public void setDay(Integer day) {
		this.day = day;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	@ManyToOne
	@CreatedBy
	public Books getBk() {
		return bk;
	}

	public void setBk(Books bk) {
		this.bk = bk;
	}

	public Record(Integer id, String borrowedName, String contactWay, String contactPhone, String date, String accredit,
			Integer reader, String book) {
		super();
		this.id = id;
		this.borrowedName = borrowedName;
		this.contactWay = contactWay;
		this.contactPhone = contactPhone;
		this.date = date;
		this.accredit = accredit;
		this.reader = reader;
		this.book = book;
	}

	public Record() {
		super();
	}

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getBorrowedName() {
		return borrowedName;
	}
	public void setBorrowedName(String borrowedName) {
		this.borrowedName = borrowedName;
	}
	public String getContactWay() {
		return contactWay;
	}
	public void setContactWay(String contactWay) {
		this.contactWay = contactWay;
	}
	public String getContactPhone() {
		return contactPhone;
	}
	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public String getAccredit() {
		return accredit;
	}
	public void setAccredit(String accredit) {
		this.accredit = accredit;
	}


	public Integer getReader() {
		return reader;
	}

	public void setReader(Integer reader) {
		this.reader = reader;
	}

	public String getBook() {
		return book;
	}

	public void setBook(String book) {
		this.book = book;
	}

	
	
	
}
